{template header}

<script type="text/javascript" src="{WEBURLPATH}/javascript/purview.common.js"></script>
<!--{if $webglobal[mode]=='usergroup'}-->
	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>用户组管理</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=usergroupadd">[添加用户组]</a>
			</td></tr>
		</tbody>
	</table>

	<table class="datatable" cellspacing="1">
	<thead> 
		<tr>
			<th width="5%">编号</th>
			<th>用户组名称</th>
			<th width="10%">管理</th>
		</tr>
	</thead>
	<tbody>
	<!--{if $webglobal[file_usergroup][dataarray]}-->
		<!--{loop $webglobal[file_usergroup][dataarray] $groupid $groupvalue}-->
		<tr>
			<td{$groupvalue[tdclass]}>{$groupvalue[id]}</td>
			<td{$groupvalue[tdclass]}>
				{$groupvalue[name]}
			</td>
			<td{$groupvalue[tdclass]}>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=usergroupedit&editid={$groupid}" class="special">[编辑]</a>
				<a href="javascript:if(confirm('您确定要删除该用户组吗？')){window.location.href='{ADMIN_WEBURLPATH}/index.php?mode=usergroupdel&delid={$groupid}'}" class="special">[删除]</a>
			</td>
		</tr>
		<!--{/loop}-->
	<!--{else}-->
		<tr><td colspan="7" style="text-align: center">还没有用户组。</td></tr>
	<!--{/if}-->
	</tbody>
	</table>

	<script type="text/javscript">
		function confirmDelete() {
			
		}
	</script>
<!--{elseif $webglobal[mode]=='usergroupadd'}-->
	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>用户组管理</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=usergroup">[用户组列表]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="addform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=usergroupadd&check">
	<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">添加用户组信息</td></tr>
		</thead>
		<tbody>
			<tr>
				<th>用户组名称<span class="need"> *</span></th>
				<td>
					<input type="text" name="name" size="40" value="" />
				</td>
			</tr>
			<tr>
				<th>设定权限<input type="checkbox" onclick="adminuser_CheckAll(this);" /></th>
				<td>
					{template purviewlist}
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="adminsubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="adminreset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>
<!--{elseif $webglobal[mode]=='usergroupedit'}-->
	<table class="menutable" cellspacing="1">
		<thead>
			<tr><td>用户组管理</td></tr>
		</thead>
		<tbody>
			<tr><td>
				<a href="{ADMIN_WEBURLPATH}/index.php?mode=usergroup">[用户组列表]</a>
			</td></tr>
		</tbody>
	</table>

	<form name="addform" method="post" action="{ADMIN_WEBURLPATH}/index.php?mode=usergroupedit&check">
	<input type="hidden" name="editid" value="{$webrequest[editid]}" />
	<table class="datatable" cellspacing="1">
		<thead>
			<tr><td colspan="2">修改用户组信息</td></tr>
		</thead>
		<tbody>
			<tr>
				<th>用户组名称<span class="need"> *</span></th>
				<td>
					<input type="text" name="name" size="40" value="{$webglobal[file_usergroup][editinfo][name]}" />
				</td>
			</tr>
			<tr>
				<th>设定权限<input type="checkbox" onclick="adminuser_CheckAll(this);" /></th>
				<td>
					{template purviewlist}
				</td>
			</tr>
		</tbody>
		<tfoot>
			<tr><td colspan="2">
				<input type="submit" name="adminsubmit" class="submitok" value=" 确  认 " />&nbsp;&nbsp;
				<input type="reset" name="adminreset" value=" 取  消 " />
			</td></tr>
		</tfoot>
	</table>
	</form>
<!--{/if}-->

{template footer}